<?php
/* @var $this HrPositionLevelController */
/* @var $dataProvider CActiveDataProvider */

$this->breadcrumbs=array(
	'Hr Position Levels',
);

$this->menu=array(
	array('label'=>'Create HrPositionLevel', 'url'=>array('create')),
	array('label'=>'Manage HrPositionLevel', 'url'=>array('admin')),
);
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . "/global/js/pages/adminHrLevel.js");
?>
<script>
var _siteUrl = '<?php echo  Yii::app()->params['siteUrl']?>';
</script>
<span class="page_h3">职位级别</span>
<div style="padding:3px;">
    <table class="s_table">
    	<tr>
            <td width="200">分类：</td>
            <td>
            <?php echo CHtml::dropDownList('attr_id' ,isset($search['attr_id'])?$search['attr_id']:0 ,$paOption,array('class'=>'big_select')); ?>
            </td>
        </tr>
        <tr>
            <td> B：</td>
            <td>
            <input name="brand" value="<?php echo $search['brand']; ?>" id="brand" class="small_input"  />
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td colspan="2">
                <input type="button"  value="Search" class="c_button" id="search_hr_level" /> 
            </td>
        </tr>
    </table>
</div>
<?php
$this->widget('zii.widgets.grid.CGridView', array(
    'id'=>'user-grid',
    'dataProvider'=>$dataProvider,
	'columns'=>array( 
		'id', 
		'name',
		array(
			'name' => '名称',
			'value'=> 'level',
		),
		array(
			'name' => '分类',
			'value'=> 'HrPositionAttribute::getAttrName($data->attr_id)',
		),
		'brand',
		array(       
            'class'=>'CButtonColumn',
			'template'=>'{update}{del}',
			'buttons'=>array(
                    'update' => array(
                            'label'=>'更新', 
                            'url'=>'Yii::app()->controller->createUrl("hrPositionLevel/update",array("id"=>$data->primaryKey))',  
                            'imageUrl'=>Yii::app()->request->baseUrl.'/global/img/icons/page_white_edit.png', 
                            'options'=>array('style'=>'cursor:pointer;','target'=>'_blank'),
                            'visible'=>'true',
                    ),
					'del' => array(
                            'label'=>'删除',    
                            'url'=>'Yii::app()->controller->createUrl("hrPositionLevel/delete",array("id"=>$data->primaryKey))',     
                            'imageUrl'=>Yii::app()->request->baseUrl.'/global/img/icons/cross.png', 
                            'options'=>array('style'=>'cursor:pointer;','confirm'=>'删除此记录？'),
							'visible'=>'true',
                      
                    )
            ),
			
        ),
		), 
		
));
?>
